<?php

declare (strict_types = 1);

namespace app\adminapi\validate;

use think\Validate;

class RoleValidate extends Validate
{
    protected $rule = [
        'name'  => 'require|max:32|min:3',
        'code'  => 'require|max:50|min:1',
    ];

    protected $message = [
        'name.require' => '角色名称不能为空',
        'name.max' => '角色名称长度3-32个字符',
        'name.min' => '角色名称长度3-32个字符',
        'code.require' => '角色标识不能为空',
        'code.max' => '角色标识长度1-50个字符',
        'code.min' => '角色标识长度1-50个字符',
    ];
}